package com.sskj.wallet.bean;

import java.util.List;

public class EthBalanceBean {

    /**
     * tokens : [{"cttAddr":"0x61f33Da40594cEc1E3Dc900FaF99F861D01e2e7D","balanceOf":"88 CRE"},{"cttAddr":"0xc0e0c1dba795bfe7c4aa302a189423460cca57ad","balanceOf":"122,073.58325196 ADPY"},{"cttAddr":"0xeccab39acb2caf9adba72c1cb92fdc106b993e0b","balanceOf":"55,978 AZ"},{"cttAddr":"0x77fe30b2cf39245267c0a5084b66a560f1cf9e1f","balanceOf":"55,978 AZ"},{"cttAddr":"0x03df4c372a29376d2c8df33a1b5f001cd8d68b0e","balanceOf":"31 BTCM"},{"cttAddr":"0x2eb86e8fc520e0f6bb5d9af08f924fe70558ab89","balanceOf":"610 LGR"},{"cttAddr":"0x1f0480a66883de97d2b054929252aae8f664c15c","balanceOf":"0.38524587 NEP"}]
     * tokensCount : 7
     * balance : 0.00010362945 Ether
     */

    private int tokensCount;
    private String balance;
    private List<TokensBean> tokens;
    private List<CoinPriceBean> price;

    public List<CoinPriceBean> getPrice() {
        return price;
    }

    public void setPrice(List<CoinPriceBean> price) {
        this.price = price;
    }

    public int getTokensCount() {
        return tokensCount;
    }

    public void setTokensCount(int tokensCount) {
        this.tokensCount = tokensCount;
    }

    public String getBalance() {
        if (balance==null){
            return balance;
        }
        return balance.replace(",","");
    }

    public void setBalance(String balance) {
        this.balance = balance;
    }

    public List<TokensBean> getTokens() {
        return tokens;
    }

    public void setTokens(List<TokensBean> tokens) {
        this.tokens = tokens;
    }

    public static class TokensBean {
        /**
         * cttAddr : 0x61f33Da40594cEc1E3Dc900FaF99F861D01e2e7D
         * balanceOf : 88 CRE
         */

        private String cttAddr;
        private String balanceOf;
        private String code;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getCttAddr() {
            return cttAddr;
        }

        public void setCttAddr(String cttAddr) {
            this.cttAddr = cttAddr;
        }

        public String getBalanceOf() {
            if (balanceOf == null) {
                return null;
            }
            return balanceOf.replace(",", "");
        }

        public void setBalanceOf(String balanceOf) {
            this.balanceOf = balanceOf;
        }
    }
}
